package demo.listener;

import demo.binder.OutputBinding;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

@EnableBinding(OutputBinding.class)
public class KafkaSender {
    private static Logger logger = LoggerFactory.getLogger(KafkaSender.class);

    @StreamListener(value = OutputBinding.OUTPUT_1)
    public void receive(String payload) {
        logger.info("OUTPUT_1 send:" + payload);
    }

    @StreamListener(value = OutputBinding.OUTPUT_2)
    public void receive2(String payload) {
        logger.info("OUTPUT_2 send:" + payload);
    }
}
